Intersoft WebTextEditor Documentation
How-to: Remove ToolBar using InitializeToolBar server-side event
See Also Send Feedback
Intersoft WebTextEditor > WebTextEditor > ToolBar > Customize toolbar programmatically from server-side > How-to: Remove ToolBar using InitializeToolBar server-side event

Glossary Item Box

WebTextEditor provides a property to remove toolbar during InitializeToolBar server side event.

In this topic, you will learn how to remove toolbar.

To remove toolbar during InitializeToolBar server side event

  1. Implement InitializeToolBar server side event in the WebTextEditor. Here is the snippet to remove toolbar using their name or position from the WebTextEditor:
    C# Copy Code
    protected void WebTextEditor1_InitializeToolBar(object sender, ISNet.WebUI.WebTextEditor.WebTextEditorToolBarArgs e)
    {    
       WebTextEditorToolBar tbFormatting = WebTextEditor1.ToolBar.GetNamedItem("WebTextEditor1_tbFormatting");    
       WebTextEditor1.ToolBar.Remove(tbFormatting);
    }
    

    OR

    C# Copy Code
    protected void WebTextEditor1_InitializeToolBar(object sender, ISNet.WebUI.WebTextEditor.WebTextEditorToolBarArgs e)
    {    
       WebTextEditor1.ToolBar.RemoveAt(0);
    }
    

See Also

©2013. All Rights Reserved.